package Ch4;

/**
 * Created by Cai Ye on 2016/3/25.
 */
public class OceanWorld3Ocean {
    public static void main(String[] args) {
        doSwim(new OceanWorld1Anemonefish("尼莫"));
        doSwim(new OceanWorld1Shark("兰尼"));
        doSwim(new OceanWorld1Human("贾斯汀"));
        doSwim(new OceanWorld1Submarine("黄色一号"));
        doSwim(new OceanWorld3Seaplane("空军零号"));
        doSwim(new OceanWorld3FlyingFish("甚平"));
    }

    static void doSwim(OceanWorld1Swimmer swimmer) {
        swimmer.swim();
    }
}
